/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ve.com.cantv.worktables.ejb.session;

import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import ve.com.cantv.worktables.ejb.entity.ActivityToActivityParticipantType;

/**
 *
 * @author Ghust
 */
@Stateless
public class ActivityToActivityParticipantTypeFacade implements ActivityToActivityParticipantTypeFacadeRemote {
    @PersistenceContext
    private EntityManager em;

    public void create(ActivityToActivityParticipantType activityToActivityParticipantType) {
        em.persist(activityToActivityParticipantType);
    }

    public void edit(ActivityToActivityParticipantType activityToActivityParticipantType) {
        em.merge(activityToActivityParticipantType);
    }

    public void remove(ActivityToActivityParticipantType activityToActivityParticipantType) {
        em.remove(em.merge(activityToActivityParticipantType));
    }

    public ActivityToActivityParticipantType find(Object id) {
        return em.find(ActivityToActivityParticipantType.class, id);
    }

    public List<ActivityToActivityParticipantType> findAll() {
        return em.createQuery("select object(o) from ActivityToActivityParticipantType as o").getResultList();
    }

}
